import request from '@/utils/request'

export function categoryUpdateSort(data) {
    return request({
        url: '/mall/product/category/update/sort',
        method: 'post',
        data: data
    })
}

export function categoryUpdate(data){
    return request({
        url: 'mall/product/category/update',
        method: 'post',
        data: data
    })
}

export function categoryDelete(data) {
    return request({
        url: 'mall/product/category/delete',
        method: 'post',
        data: data
    })
}

export function categoryListTree(){
    return request({
        url: 'mall/product/category/list/tree',
        method: 'get'
    })
}

export function categorySave(data){
    return request({
        url: 'mall/product/category/save',
        method: 'post',
        data: data
    })
}

export function categoryInfo(catId){
    return request({
        url: 'mall/product/category/info/' + catId,
        method: 'get'
    })
}